@extends('Admin.Layout.main')
@section('content')
        <!-- Main content -->
        <section class="content">
            <!-- Small boxes (Stat box) -->
            <div class="row">
                <div class="col-lg-3 col-xs-6">
                    <!-- small box -->
                    <div class="small-box bg-aqua">
                        <div class="inner" style="float: left;">
                            <h3>
                                <font color="#adff2f" style="font-weight:bold;">
                                    <?php
                                        if(!empty($data['userNum'][0]->userNum))
                                        {
                                            echo $data['userNum'][0]->userNum;
                                        }else{
                                            echo 0;
                                        }
                                    ?>
                                </font>
                            </h3>

                            <p><font color="#adff2f" style="font-weight:bold;">正常用户</font></p>
                        </div>
                        <div class="inner">
                            <h3>
                                <font color="red" style="font-weight:bold;">
                                    <?php
                                        if(!empty($data['userNum'][1]->userNum))
                                        {
                                            echo $data['userNum'][1]->userNum;
                                        }else{
                                            echo 0;
                                        }
                                    ?>
                                </font>
                            </h3>

                            <p><font color="red" style="font-weight:bold;">删除用户</font></p>
                        </div>
                        <div class="icon">
                            <i class="fa fa-users"></i>
                        </div>

                    </div>
                </div>
                <!-- ./col -->
                <div class="col-lg-3 col-xs-6">
                    <!-- small box -->
                    <div class="small-box bg-green">
                        <div class="inner">
                            <h3>
                                <?php
                                    if(!empty($data['userAcNum'][0]->userAcNum))
                                    {
                                        echo $data['userAcNum'][0]->userAcNum;
                                    }else{
                                        echo 0;
                                    }
                                ?>
                            </h3>

                            <p>用户行为</p>
                        </div>
                        <div class="icon">
                            <i class="fa fa-users"></i>
                        </div>

                    </div>
                </div>
                <!-- ./col -->
            </div>


            <!-- /.row -->
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <!-- /.box-header -->
                        <div class="box-body">
                            <div class="box-header">
                                <h3>系统信息</h3>
                            </div>
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>系统类型及版本号</th>
                                    <th>PHP版本</th>
                                    <th>Mysql数据库版本</th>
                                    <th>页面通信协议</th>
                                    <th>剩余可使用空间</th>
                                    
                                </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><?php if(!empty(php_uname('s'))) echo php_uname('s');?></td>
                                        <td><?php if(!empty(PHP_VERSION)) echo PHP_VERSION;?></td>
                                        <td><?php if(!empty($data['version'][0]->version)) echo $data['version'][0]->version;?></td>
                                        <td><?php if(!empty($_SERVER['SERVER_PROTOCOL'])) echo $_SERVER['SERVER_PROTOCOL'];?></td>
                                        <td><?php if(!empty($data['serberTotal'])) echo $data['serberTotal'];?></td>
                                    </tr>
                                </tbody>
                            </table>

                        </div>
                        <!-- /.box-body -->
                    </div>
                    <!-- /.box -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <!-- /.box-header -->
                        <div class="box-header">
                            <h3>最近用户操作行为</h3>
                        </div>
                        <div class="box-body">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>操作行为</th>
                                    <th>操作时间</th>
                                    <th>操作IP</th>
                                </tr>
                                </thead>
                                <tbody>
                                    @if(!empty($data['userLog']))
                                        @foreach($data['userLog'] as $v)
                                            <tr>
                                                <td style="word-wrap: break-word;">
                                                    <?php
                                                    if(!empty($v->con))
                                                    {
                                                        echo $v->con;
                                                    }
                                                    ?>
                                                </td>
                                                <td>
                                                    <?php
                                                    if(!empty($v->create_time))
                                                    {
                                                        echo date('Y-m-d H:i:s',$v->create_time);
                                                    }
                                                    ?>
                                                </td>
                                                <td>
                                                    <?php
                                                    if(!empty($v->ip))
                                                    {
                                                        echo $v->ip;
                                                    }
                                                    ?>
                                                </td>
                                            </tr>
                                        @endforeach
                                    @endif
                                </tbody>
                            </table>

                        </div>
                        <!-- /.box-body -->
                    </div>
                    <!-- /.box -->
                </div>
                <!-- /.col -->
            </div>
            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <section class="col-lg-7 connectedSortable">

                </section>
                <!-- /.Left col -->
                <!-- right col (We are only adding the ID to make the widgets sortable)-->
                <section class="col-lg-5 connectedSortable">
                </section>
                <!-- right col -->
            </div>
            <!-- /.row (main row) -->

        </section>
        <!-- /.content -->
    </div>
@endsection
@section('privatefooter')
    <script src="{{__BASE__}}/admin/dist/js/pages/index.js"></script>
@endsection